package operation;

import book.Book;
import book.BookList;

import java.util.Arrays;

public class ShowBook implements IOPeration{
    @Override
    public void work(BookList bookList){
        Book[] Books = bookList.books.toArray(new Book[0]);
        Arrays.sort(Books,Book::compareToid);
        //小于<图书集合>的长度
        for (int i = 0; i < Books.length; i++) {
            System.out.println(Books[i]);
        }
    }
}
